package com.zh.work.entity.agent;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.zh.common.entity.ImageEntity;
import com.zh.work.entity.merch.MerchInfoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


@ApiModel(value = "代理商信息基础类")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("agent_info")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AgentInfoEntity extends ImageEntity {

    private static final long serialVersionUID = -9083199742109312295L;

    @ApiModelProperty(value = "主键", name = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "代理商编号(4位地区代码+6位顺序号)", name = "agentNo")
    @TableField(value = "agentno")
    private String agentNo;


    @ApiModelProperty(value = "代理商简称", name = "agentName")
    @TableField(value = "agent_name")
    private String agentName;


    @ApiModelProperty(value = "代理商全称", name = "fullName")
    @TableField(value = "full_name")
    private String fullName;


    @ApiModelProperty(value = "代理商级别", name = "agentLevel")
    @TableField(value = "agent_level")
    private Integer agentLevel;


    @ApiModelProperty(value = "法人姓名", name = "legalName")
    @TableField(value = "legal_name")
    private String legalName;


    @ApiModelProperty(value = "法人身份证号", name = "identityCard")
    @TableField(value = "identity_card")
    private String identityCard;


    @ApiModelProperty(value = "联系人", name = "linkMan")
    @TableField(value = "link_man")
    private String linkMan;


    @ApiModelProperty(value = "电子邮箱", name = "email")
    @TableField(value = "email")
    private String email;


    @ApiModelProperty(value = "固定电话", name = "telephone")
    @TableField(value = "telephone")
    private String telephone;


    @ApiModelProperty(value = "手机号码", name = "mobile")
    @TableField(value = "mobile")
    private String mobile;


    @ApiModelProperty(value = "加盟费", name = "memberFee")
    @TableField(value = "member_fee")
    private BigDecimal memberFee;


    @ApiModelProperty(value = "保证金", name = "assuranceFee")
    @TableField(value = "assurance_fee")
    private BigDecimal assuranceFee;


    @ApiModelProperty(value = "所属销售人员ID", name = "salerId")
    @TableField(value = "saler_id")
    private Integer salerId;


    @ApiModelProperty(value = "销售员名称", name = "salerName")
    @TableField(value = "saler_name")
    private String salerName;


    @ApiModelProperty(value = "所在省市区", name = "provinceCity")
    @TableField(value = "province_city")
    private String provinceCity;


    @ApiModelProperty(value = "详细地址", name = "address")
    @TableField(value = "address")
    private String address;


    @ApiModelProperty(value = "上级代理商编号(运营平台为1000000000)", name = "superAgent")
    @TableField(value = "super_agent")
    private String superAgent;


    @ApiModelProperty(value = "代理商状态 1-未开通 2-已开通", name = "status")
    @TableField(value = "status")
    private Integer status;


    @ApiModelProperty(value = "开通时间", name = "openTime")
    @TableField(value = "open_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date openTime;


    @ApiModelProperty(value = "审核状态 1-待审核 2-审核拒绝 3-审核通过", name = "auditStatus")
    @TableField(value = "audit_status")
    private Integer auditStatus;


    @ApiModelProperty(value = "审核对象(运营平台为1000000000)", name = "auditAgentno")
    @TableField(value = "audit_agentno")
    private String auditAgentNo;


    @ApiModelProperty(value = "与平台的分成比例(范围:0-100)", name = "divide")
    @TableField(value = "divide")
    private Integer divide;


    @ApiModelProperty(value = "结算账户", name = "accountNo")
    @TableField(value = "accountno")
    private String accountNo;

    @ApiModelProperty(value = "帐户类型 1-对私 2-对公", name = "accountType")
    @TableField(value = "account_type")
    private Integer accountType;


    @ApiModelProperty(value = "帐户户名", name = "accountName")
    @TableField(value = "account_name")
    private String accountName;


    @ApiModelProperty(value = "开户行行号", name = "bankno")
    @TableField(value = "bankno")
    private String bankNo;

    @ApiModelProperty(value = "银行名称", name = "bankName")
    @TableField(value = "bank_name")
    private String bankName;


    @ApiModelProperty(value = "录入时间", name = "addTime")
    @TableField(value = "add_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date addTime;

    @ApiModelProperty(value = "用户id", name = "userId")
    @TableField(value = "user_id")
    private Integer userId;


    @ApiModelProperty(value = "代理商类型0:普通代理商，1:OEM代理商，2:机构接入代理商", name = "agentType")
    @TableField(value = "agent_type")
    private Integer agentType;


    @ApiModelProperty(value = "分公司编码", name = "branchno")
    @TableField(value = "branchno")
    private String branchNo;


    @ApiModelProperty(value = "一级代理商编号", name = "agentNoFirst")
    @TableField(value = "agentno_first")
    private String agentNoFirst;


    @ApiModelProperty(value = "开通的业务类型", name = "bizType")
    @TableField(value = "biz_type")
    private Integer bizType;


    @ApiModelProperty(value = "地区编码", name = "areaCode")
    @TableField(value = "area_code")
    private String areaCode;


    @ApiModelProperty(value = "pos提现费率分成", name = "withdrawalFee")
    private BigDecimal withdrawalFee;


    @ApiModelProperty(value = "银行卡t0分成比例", name = "t0Divide")
    @TableField(value = "t0_divide")
    private Integer t0Divide;


    @ApiModelProperty(value = "银行卡t1分成比例", name = "t1Divide")
    @TableField(value = "t1_divide")
    private Integer t1Divide;


    @ApiModelProperty(value = "借记卡POS费率", name = "posDebitRate")
    @TableField(value = "pos_debit_rate")
    private BigDecimal posDebitRate;


    @ApiModelProperty(value = "借记卡POS封顶", name = "posDebitFixed")
    @TableField(value = "pos_debit_fixed")
    private BigDecimal posDebitFixed;


    @ApiModelProperty(value = "信用卡POS费率", name = "posCreditRate")
    @TableField(value = "pos_credit_rate")
    private BigDecimal posCreditRate;


    @ApiModelProperty(value = "借记卡APP费率", name = "appDebitRate")
    @TableField(value = "app_debit_rate")
    private BigDecimal appDebitRate;


    @ApiModelProperty(value = "借记卡APP封顶", name = "appDebitFixed")
    @TableField(value = "app_debit_fixed")
    private BigDecimal appDebitFixed;


    @ApiModelProperty(value = "信用卡APP费率", name = "appCreditRate")
    @TableField(value = "app_credit_rate")
    private BigDecimal appCreditRate;


    @ApiModelProperty(value = "POST+0费率增量", name = "posT0Rate")
    @TableField(value = "pos_t0_rate")
    private BigDecimal posT0Rate;


    @ApiModelProperty(value = "APPT+0费率增量", name = "appT0Rate")
    @TableField(value = "app_t0_rate")
    private BigDecimal appT0Rate;


    @ApiModelProperty(value = "网关T1封顶", name = "gatewayFixed")
    @TableField(value = "gateway_fixed")
    private BigDecimal gatewayFixed;

    @ApiModelProperty(value = "网关T0费率", name = "gatewayRateT0")
    @TableField(value = "gateway_rate_t0")
    private BigDecimal gatewayRateT0;

    @ApiModelProperty(value = "网关T1费率", name = "gatewayRateT1")
    @TableField(value = "gateway_rate_t1")
    private BigDecimal gatewayRateT1;

    @ApiModelProperty(value = "二维码提现费分成", name = "qrcodeWithdrawal")
    @TableField(value = "qrcode_withdrawal")
    private BigDecimal qrcodeWithdrawal;


    @ApiModelProperty(value = "快捷T+1成本", name = "quickRateT1")
    @TableField(value = "quick_rate_t1")
    private BigDecimal quickRateT1;


    @ApiModelProperty(value = "快捷T+0成本", name = "quickRateT0")
    @TableField(value = "quick_rate_t0")
    private BigDecimal quickRateT0;

    @ApiModelProperty(value = "图片信息json字符串", name = "imgJsonString")
    @TableField(exist = false)
    private String imgJsonString;

    @ApiModelProperty(value = "相关图片存储实体信息", name = "imageEntity")
    @TableField(exist = false)
    private ImageEntity imageEntity;


    @ApiModelProperty(value = "下属商户数据集合", name = "children")
    @TableField(exist = false)
    private List<MerchInfoEntity> children;



}
